package com.ferris.redbook.dto.response;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;
import java.util.List;

@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class PostResponse {
    private Long id;
    private String title;
    private String content;
    private String coverImage;
    private List<String> images; // 需要从post_images表查询
    private String type;
    private Integer viewCount;
    private Integer likeCount;
    private Integer commentCount;
    private Integer collectCount;
    private Integer shareCount;
    private String location;
    private LocalDateTime createdAt;
    private UserResponse user; // 需要关联users表
    private List<String> tags; // 需要从tags和post_tags表查询
    private Boolean isLiked;   // 需要从likes表查询当前用户
    private Boolean isCollected; // 需要从collections表查询当前用户
}